﻿using STT.Layer.Connection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace STT.Profile.UserControlsGV
{
    public partial class UcMenuGV : System.Web.UI.UserControl
    {
        ToolBox tb = new ToolBox();
        Control ct = new Control();
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadAvatar();
        }
        private void LoadAvatar()
        {
            if (Session["MaFgv"] != null)
            {
                DtlAvatar.DataSource = tb.GetDataTableById2("[GiangVien_GetByMagv]", Session["MaFgv"].ToString());
                DtlAvatar.DataBind();
            }
            else
            {
                Response.Redirect("~/Default.aspx");
            }

        }
        protected void lbtthoat_Click(object sender, EventArgs e)
        {
            Session["MaFDN"] = null;
            Session["roleFhvgv"] = null;
            Session["MaFgv"] = null;
            Session["FAnh"] = null;
            Response.Cookies["UserinfoFDN"].Expires = DateTime.Now.AddDays(-1);
            Response.Redirect("~/Default.aspx");
        }
    }
}